import { useParams } from 'react-router-dom';

import VulnerableTemplate from '@/components/VulnerableTemplate';

import SqliNumber from './level/SqliNumber';
import SqliString from './level/SqliString';

const Sqli = () => {
  const { level } = useParams();
  const levelMap: any = {
    string: SqliString,
    number: SqliNumber,
  };

  return <VulnerableTemplate {...levelMap[level!]} />;
};

export default Sqli;
